"aspect-build/rules_rollup"

module(
    name = "aspect_rules_rollup",
    version = "1.0.3",
    compatibility_level = 1,
)

# Lower-bounds (minimum) versions for direct runtime dependencies
bazel_dep(name = "bazel_skylib", version = "1.3.0")

# Need feat: backport 2.x features for interoperability by @kormide in #657
bazel_dep(name = "aspect_bazel_lib", version = "1.38.0")

# Need feat: import toolchains to use for copy actions by @kormide in #1355
bazel_dep(name = "aspect_rules_js", version = "1.34.0")
bazel_dep(name = "rules_nodejs", version = "5.5.3")
bazel_dep(name = "platforms", version = "0.0.5")

rollup = use_extension("@aspect_rules_rollup//rollup:extensions.bzl", "rollup")
rollup.toolchain(
    name = "rollup",
    rollup_version = "v2.70.2",
)
use_repo(rollup, "rollup")

####### Dev dependencies ########

bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
    name = "npm",
    npmrc = "//:.npmrc",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")

# We want the stardoc handling from bazel-lib 2.x for dev use here,
# but not force users to upgrade yet.
archive_override(
    module_name = "aspect_bazel_lib",
    integrity = "sha256-9ep2aCsgnMC9kND1o7JtL3pqKIXwxfYV5ykT9IBduw0=",
    strip_prefix = "bazel-lib-2.5.0",
    urls = ["https://github.com/aspect-build/bazel-lib/releases/download/v2.5.0/bazel-lib-v2.5.0.tar.gz"],
)
